package model

type ReqGoods struct {
	Id                  int                      `xorm:"pk autoincr INT(10)" json:"id" form:"id"`
	Acid                int                      `xorm:"" json:"acid" form:"acid"`
	Title               string                   `xorm:"" json:"title" form:"title" binding:"required" required_err:"请输入商品标题"`
	SubTitle            string                   `xorm:"" json:"sub_title" form:"sub_title" binding:"required" required_err:"请输入商品副标题"`
	OrgPrice            float32                  `xorm:"" json:"org_price" form:"org_price" binding:"required" required_err:"请输入商品原价"`
	Price               float32                  `xorm:"" json:"price" form:"price" binding:"required" required_err:"请输入团购价"`
	GroupNum            int                      `xorm:"" json:"group_num" form:"group_num" binding:"required" required_err:"请输入团数量"`
	Stock               int                      `xorm:"" json:"stock" form:"stock" binding:"required" required_err:"请输入商品库存"`
	Photo               string                   `xorm:"" json:"photo" form:"photo" binding:"required" required_err:"上传商品图片"`
	StartEndTime        []string                 `xorm:"" json:"start_end_time" form:"start_end_time" binding:"required" required_err:"请选择在售时间"`
	Video               string                   `xorm:"" json:"video" form:"video"`
	Coupon              string                   `xorm:"" json:"coupon" form:"coupon"`
	BgMusic             string                   `xorm:"" json:"bg_music" form:"bg_music"`
	Detail              string                   `xorm:"" json:"detail" form:"detail"`
	ShareTitle          string                   `xorm:"" json:"share_title" form:"share_title"`
	ShareImg            string                   `xorm:"" json:"share_img" form:"share_img"`
	Sp1Reward           string                   `xorm:"" json:"sp1_reward" form:"sp1_reward"`
	Sp2Reward           string                   `xorm:"" json:"sp2_reward" form:"sp2_reward"`
	SpRewardAutoSend    int                      `xorm:"" json:"sp_reward_auto_send" form:"sp_reward_auto_send"`
	Config              map[string]interface{}   `xorm:"" json:"config" form:"config"`
	Form                []map[string]interface{} `xorm:"" json:"form" form:"form"`
	Theme               map[string]interface{}   `xorm:"" json:"theme" form:"theme"`
	PosterBgImg         string                   `xorm:"" json:"poster_bg_img" form:"poster_bg_img"`
	GuideImg            string                   `xorm:"" json:"guide_img" form:"guide_img"`
	Contact             map[string]interface{}   `xorm:"" json:"contact" form:"contact"`
	Views               int                      `xorm:"" json:"views" form:"views"`
	Income              float32                  `xorm:"" json:"income" form:"income"`
	Sales               int64                    `xorm:"" json:"sales" form:"sales"`
	ShareTimeline       int                      `xorm:"" json:"share_timeline" form:"share_timeline"`
	ShareAppMessage     int                      `xorm:"" json:"share_app_message" form:"share_app_message"`
	State               int                      `xorm:"" json:"state" form:"state"`
	ScreenboardPassword string                   `xorm:"" json:"screenboard_password" form:"screenboard_password"`
	CreatedAt           int                      `xorm:"created" json:"created_at" form:"created_at"`
	UpdatedAt           int                      `xorm:"updated" json:"updated_at" form:"updated_at"`
	DeletedAt           int                      `xorm:"deleted" json:"deleted_at" form:"deleted_at"`
	ShareQrcodeUrl      string                   `xorm:"-" json:"share_qrcode_url" form:"share_qrcode_url"`
	Token               string                   `xorm:"-" json:"token" form:"token"`
	CarmineId           int                      `xorm:"" json:"carmine_id"`
	CarmineNumber       int                      `xorm:"" json:"carmine_number"`
	GroupPoints         int                      `json:"group_points"`
	MemberPoints        int                      `json:"member_points"`
	FullReturn          int                      `json:"full_return"`
}

func (ReqGoods) TableName() string {
	return "goods"
}
